<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TMCStepper: src/source/TMC2208Stepper.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">TMCStepper
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_t_m_c2208_stepper_8cpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">TMC2208Stepper.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_t_m_c2208_stepper_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_t_m_c_stepper_8h.html">TMCStepper.h</a>&quot;</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_t_m_c___m_a_c_r_o_s_8h.html">TMC_MACROS.h</a>&quot;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_s_e_r_i_a_l___s_w_i_t_c_h_8h.html">SERIAL_SWITCH.h</a>&quot;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160; </div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">// Protected</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">// addr needed for TMC2209</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#abd21d50443d931cfe7604af951bd3bfa">    7</a></span>&#160;<a class="code" href="class_t_m_c2208_stepper.html#a57a21913e94361f97293dc881a693b6d">TMC2208Stepper::TMC2208Stepper</a>(Stream * SerialPort, <span class="keywordtype">float</span> RS, uint8_t addr) :</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;    <a class="code" href="class_t_m_c_stepper.html">TMCStepper</a>(RS),</div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;    slave_address(addr)</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;    {</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;        <a class="code" href="class_t_m_c2208_stepper.html#aefd41ece3496f7e54e11d552a894ce66">HWSerial</a> = SerialPort;</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;        <a class="code" href="class_t_m_c2208_stepper.html#a87e31a3e6c891b3b9a72812d3ceb9868">defaults</a>();</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;    }</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a57a21913e94361f97293dc881a693b6d">   15</a></span>&#160;<a class="code" href="class_t_m_c2208_stepper.html#a57a21913e94361f97293dc881a693b6d">TMC2208Stepper::TMC2208Stepper</a>(Stream * SerialPort, <span class="keywordtype">float</span> RS, uint8_t addr, uint16_t mul_pin1, uint16_t mul_pin2) :</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <a class="code" href="class_t_m_c2208_stepper.html">TMC2208Stepper</a>(SerialPort, RS)</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    {</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;        <a class="code" href="class_s_switch.html">SSwitch</a> *SMulObj = <span class="keyword">new</span> <a class="code" href="class_s_switch.html">SSwitch</a>(mul_pin1, mul_pin2, addr);</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;        <a class="code" href="class_t_m_c2208_stepper.html#a1f0e6d59f0378c19b486e7f6dda81747">sswitch</a> = SMulObj;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    }</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#if SW_CAPABLE_PLATFORM</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    <span class="comment">// Protected</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <span class="comment">// addr needed for TMC2209</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <a class="code" href="class_t_m_c2208_stepper.html#a57a21913e94361f97293dc881a693b6d">TMC2208Stepper::TMC2208Stepper</a>(uint16_t SW_RX_pin, uint16_t SW_TX_pin, <span class="keywordtype">float</span> RS, uint8_t addr) :</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        <a class="code" href="class_t_m_c_stepper.html">TMCStepper</a>(RS),</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        RXTX_pin(SW_RX_pin == SW_TX_pin ? SW_RX_pin : 0),</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        slave_address(addr)</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        {</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;            SoftwareSerial *SWSerialObj = <span class="keyword">new</span> SoftwareSerial(SW_RX_pin, SW_TX_pin);</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;            SWSerial = SWSerialObj;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;            <a class="code" href="class_t_m_c2208_stepper.html#a87e31a3e6c891b3b9a72812d3ceb9868">defaults</a>();</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        }</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_t_m_c2208_stepper.html#a6621972ab7af79ca78579f692048a205">TMC2208Stepper::beginSerial</a>(uint32_t baudrate) {</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keywordflow">if</span> (SWSerial != <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        {</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;            SWSerial-&gt;begin(baudrate);</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;            SWSerial-&gt;stopListening();</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        }</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">        #if defined(ARDUINO_ARCH_AVR)</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;            <span class="keywordflow">if</span> (RXTX_pin &gt; 0) {</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;                digitalWrite(RXTX_pin, HIGH);</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;                pinMode(RXTX_pin, OUTPUT);</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;            }</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">        #endif</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    }</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a974fa83e3bab04cd9f9a7b2d31ebd18e">   50</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2208_stepper.html#a974fa83e3bab04cd9f9a7b2d31ebd18e">TMC2208Stepper::begin</a>() {</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">    #if SW_CAPABLE_PLATFORM</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        <a class="code" href="class_t_m_c2208_stepper.html#a6621972ab7af79ca78579f692048a205">beginSerial</a>(115200);</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor">    #endif</span></div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <a class="code" href="class_t_m_c2208_stepper.html#a9de4a150926f2875903be27063f00973">pdn_disable</a>(<span class="keyword">true</span>);</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <a class="code" href="class_t_m_c2208_stepper.html#a02994cba6b9ac73b61799cf7af0fd588">mstep_reg_select</a>(<span class="keyword">true</span>);</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;}</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160; </div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a87e31a3e6c891b3b9a72812d3ceb9868">   59</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2208_stepper.html#a87e31a3e6c891b3b9a72812d3ceb9868">TMC2208Stepper::defaults</a>() {</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    GCONF_register.i_scale_analog = 1;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    GCONF_register.internal_rsense = 0; <span class="comment">// OTP</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    GCONF_register.en_spreadcycle = 0; <span class="comment">// OTP</span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    GCONF_register.multistep_filt = 1; <span class="comment">// OTP</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    IHOLD_IRUN_register.iholddelay = 1; <span class="comment">// OTP</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    TPOWERDOWN_register.sr = 20;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    CHOPCONF_register.sr = 0x10000053;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    PWMCONF_register.sr = 0xC10D0024;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  <span class="comment">//MSLUT0_register.sr = ???;</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  <span class="comment">//MSLUT1_register.sr = ???;</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  <span class="comment">//MSLUT2_register.sr = ???;</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  <span class="comment">//MSLUT3_register.sr = ???;</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  <span class="comment">//MSLUT4_register.sr = ???;</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  <span class="comment">//MSLUT5_register.sr = ???;</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  <span class="comment">//MSLUT6_register.sr = ???;</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  <span class="comment">//MSLUT7_register.sr = ???;</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  <span class="comment">//MSLUTSTART_register.start_sin90 = 247;</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;}</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160; </div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a8eb0d71fbfeeb24c9092328c44fab7e5">   79</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2208_stepper.html#a8eb0d71fbfeeb24c9092328c44fab7e5">TMC2208Stepper::push</a>() {</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <a class="code" href="class_t_m_c2208_stepper.html#a549db4f962d4ae698dda33ef9a708e33">GCONF</a>(GCONF_register.sr);</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <a class="code" href="class_t_m_c_stepper.html#a597bc308bad0d1198b98c48a6ef34fc3">IHOLD_IRUN</a>(IHOLD_IRUN_register.sr);</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <a class="code" href="class_t_m_c2208_stepper.html#a7a0682fc7f4d103bf3ceee4cabb411bb">SLAVECONF</a>(SLAVECONF_register.sr);</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <a class="code" href="class_t_m_c_stepper.html#a66812c883dfbb6dedc046a011b2564be">TPOWERDOWN</a>(TPOWERDOWN_register.sr);</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <a class="code" href="class_t_m_c_stepper.html#ac59a9305aafc64a63698a34cac404788">TPWMTHRS</a>(TPWMTHRS_register.sr);</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <a class="code" href="class_t_m_c2208_stepper.html#a28b7ebef9a1f4b04d4b3b1e5e83ff76f">VACTUAL</a>(VACTUAL_register.sr);</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <a class="code" href="class_t_m_c2208_stepper.html#aa11281f54c293f3ff2539b1a583682a9">CHOPCONF</a>(CHOPCONF_register.sr);</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <a class="code" href="class_t_m_c2208_stepper.html#a7c2e849de2f2933ba9bf8ede8dc53f53">PWMCONF</a>(PWMCONF_register.sr);</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;}</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160; </div>
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a9ad9b892e8abf475e15e6d8c30c56ce2">   90</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2208_stepper.html#a9ad9b892e8abf475e15e6d8c30c56ce2">TMC2208Stepper::isEnabled</a>() { <span class="keywordflow">return</span> !<a class="code" href="class_t_m_c2208_stepper.html#acc1f92ce007231215fc4266fb4b99a62">enn</a>() &amp;&amp; <a class="code" href="class_t_m_c2208_stepper.html#aad3790e8c9040b5b4770ee65ed06b1ed">toff</a>(); }</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a409c19fa6b052a370a317d061bf9af4e">   92</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2208_stepper.html#a409c19fa6b052a370a317d061bf9af4e">TMC2208Stepper::calcCRC</a>(uint8_t datagram[], uint8_t len) {</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    uint8_t crc = 0;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordflow">for</span> (uint8_t i = 0; i &lt; len; i++) {</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        uint8_t currentByte = datagram[i];</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        <span class="keywordflow">for</span> (uint8_t j = 0; j &lt; 8; j++) {</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;            <span class="keywordflow">if</span> ((crc &gt;&gt; 7) ^ (currentByte &amp; 0x01)) {</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;                crc = (crc &lt;&lt; 1) ^ 0x07;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;            } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;                crc = (crc &lt;&lt; 1);</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;            }</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;            crc &amp;= 0xff;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;            currentByte = currentByte &gt;&gt; 1;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        }</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    }</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="keywordflow">return</span> crc;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;}</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">class</span> SERIAL_TYPE&gt;</div>
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#ae561da4ec7c40830e97bf4dc8cf700fb">  110</a></span>&#160;int16_t <a class="code" href="class_t_m_c2208_stepper.html#ae561da4ec7c40830e97bf4dc8cf700fb">TMC2208Stepper::serial_read</a>(SERIAL_TYPE &amp;serPtr) {</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <span class="keywordflow">return</span> serPtr.read();</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;}</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">class</span> SERIAL_TYPE&gt;</div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a7dd83313385079099b0622957786a979">  114</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2208_stepper.html#a7dd83313385079099b0622957786a979">TMC2208Stepper::serial_write</a>(SERIAL_TYPE &amp;serPtr, <span class="keyword">const</span> uint8_t data) {</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keywordflow">return</span> serPtr.write(data);</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;}</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a142b14de8a4dcc6cf76b4a6ede9e1cea">  118</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2208_stepper.html#a142b14de8a4dcc6cf76b4a6ede9e1cea">TMC2208Stepper::write</a>(uint8_t addr, uint32_t regVal) {</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    uint8_t len = 7;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    addr |= <a class="code" href="class_t_m_c_stepper.html#ada185e5fe9970deb7d488cee26314878">TMC_WRITE</a>;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    uint8_t datagram[] = {<a class="code" href="class_t_m_c2208_stepper.html#a00055ef39eb155038ef2c9938e7367ad">TMC2208_SYNC</a>, <a class="code" href="class_t_m_c2208_stepper.html#ab6ef909bbc73e9f8f0a33076e10f3196">slave_address</a>, addr, (uint8_t)(regVal&gt;&gt;24), (uint8_t)(regVal&gt;&gt;16), (uint8_t)(regVal&gt;&gt;8), (uint8_t)(regVal&gt;&gt;0), 0x00};</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    datagram[len] = <a class="code" href="class_t_m_c2208_stepper.html#a409c19fa6b052a370a317d061bf9af4e">calcCRC</a>(datagram, len);</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160; </div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="preprocessor">    #if SW_CAPABLE_PLATFORM</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        <span class="keywordflow">if</span> (SWSerial != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;                <span class="keywordflow">for</span>(uint8_t i=0; i&lt;=len; i++){</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;                    <a class="code" href="class_t_m_c2208_stepper.html#a0e6a670edec623e394c4672c3eea9c0b">bytesWritten</a> += <a class="code" href="class_t_m_c2208_stepper.html#a7dd83313385079099b0622957786a979">serial_write</a>(*SWSerial, datagram[i]);</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;                }</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        } <span class="keywordflow">else</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="preprocessor">    #endif</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        {</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="class_t_m_c2208_stepper.html#a1f0e6d59f0378c19b486e7f6dda81747">sswitch</a> != <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;                <a class="code" href="class_t_m_c2208_stepper.html#a1f0e6d59f0378c19b486e7f6dda81747">sswitch</a>-&gt;<a class="code" href="class_s_switch.html#a6ff09d0850d551571dc333fb74ff8628">active</a>();</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160; </div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;            <span class="keywordflow">for</span>(uint8_t i=0; i&lt;=len; i++){          </div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;                <a class="code" href="class_t_m_c2208_stepper.html#a0e6a670edec623e394c4672c3eea9c0b">bytesWritten</a> += <a class="code" href="class_t_m_c2208_stepper.html#a7dd83313385079099b0622957786a979">serial_write</a>(*<a class="code" href="class_t_m_c2208_stepper.html#aefd41ece3496f7e54e11d552a894ce66">HWSerial</a>, datagram[i]);</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        }</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    }</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    delay(<a class="code" href="class_t_m_c2208_stepper.html#a1c9a0e09dcee4483f712e89815abdf32">replyDelay</a>);</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;}</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160; </div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> SERIAL_TYPE&gt;</div>
<div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a3e1f6a10aa1e3e41dc2594dbe1ea8a1d">  144</a></span>&#160;uint64_t <a class="code" href="class_t_m_c2208_stepper.html#a3e1f6a10aa1e3e41dc2594dbe1ea8a1d">TMC2208Stepper::_sendDatagram</a>(SERIAL_TYPE &amp;serPtr, uint8_t datagram[], <span class="keyword">const</span> uint8_t len, uint16_t timeout) {</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    <span class="keywordflow">while</span> (serPtr.available() &gt; 0) <a class="code" href="class_t_m_c2208_stepper.html#ae561da4ec7c40830e97bf4dc8cf700fb">serial_read</a>(serPtr); <span class="comment">// Flush</span></div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160; </div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="preprocessor">    #if defined(ARDUINO_ARCH_AVR)</span></div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        <span class="keywordflow">if</span> (RXTX_pin &gt; 0) {</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;            digitalWrite(RXTX_pin, HIGH);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;            pinMode(RXTX_pin, OUTPUT);</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        }</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;<span class="preprocessor">    #endif</span></div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160; </div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0; i&lt;=len; i++) <a class="code" href="class_t_m_c2208_stepper.html#a7dd83313385079099b0622957786a979">serial_write</a>(serPtr, datagram[i]);</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160; </div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;<span class="preprocessor">    #if defined(ARDUINO_ARCH_AVR)</span></div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <span class="keywordflow">if</span> (RXTX_pin &gt; 0) {</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;            pinMode(RXTX_pin, INPUT_PULLUP);</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        }</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;<span class="preprocessor">    #endif</span></div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160; </div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    delay(this-&gt;<a class="code" href="class_t_m_c2208_stepper.html#a1c9a0e09dcee4483f712e89815abdf32">replyDelay</a>);</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160; </div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <span class="comment">// scan for the rx frame and read it</span></div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    uint32_t ms = millis();</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    uint32_t sync_target = (<span class="keyword">static_cast&lt;</span>uint32_t<span class="keyword">&gt;</span>(datagram[0])&lt;&lt;16) | 0xFF00 | datagram[2];</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    uint32_t sync = 0;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160; </div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <span class="keywordflow">do</span> {</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        uint32_t <a class="code" href="class_t_m_c2208_stepper.html#a4ec5d2b2f5a31259c7aba1f3208d63b8">ms2</a> = millis();</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_t_m_c2208_stepper.html#a4ec5d2b2f5a31259c7aba1f3208d63b8">ms2</a> != ms) {</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;            <span class="comment">// 1ms tick</span></div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;            ms = <a class="code" href="class_t_m_c2208_stepper.html#a4ec5d2b2f5a31259c7aba1f3208d63b8">ms2</a>;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;            timeout--;</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        }</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="keywordflow">if</span> (!timeout) <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160; </div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        int16_t res = <a class="code" href="class_t_m_c2208_stepper.html#ae561da4ec7c40830e97bf4dc8cf700fb">serial_read</a>(serPtr);</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        <span class="keywordflow">if</span> (res &lt; 0) <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160; </div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        sync &lt;&lt;= 8;</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        sync |= res &amp; 0xFF;</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        sync &amp;= 0xFFFFFF;</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160; </div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;    } <span class="keywordflow">while</span> (sync != sync_target);</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160; </div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    uint64_t out = sync;</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    ms = millis();</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    timeout = this-&gt;<a class="code" href="class_t_m_c2208_stepper.html#a27d18156b6d33d2d4d7285d6b47dd1c0">abort_window</a>;</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160; </div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    <span class="keywordflow">for</span>(uint8_t i=0; i&lt;5;) {</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        uint32_t <a class="code" href="class_t_m_c2208_stepper.html#a4ec5d2b2f5a31259c7aba1f3208d63b8">ms2</a> = millis();</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="class_t_m_c2208_stepper.html#a4ec5d2b2f5a31259c7aba1f3208d63b8">ms2</a> != ms) {</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;            <span class="comment">// 1ms tick</span></div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;            ms = <a class="code" href="class_t_m_c2208_stepper.html#a4ec5d2b2f5a31259c7aba1f3208d63b8">ms2</a>;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;            timeout--;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        }</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        <span class="keywordflow">if</span> (!timeout) <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160; </div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;        int16_t res = <a class="code" href="class_t_m_c2208_stepper.html#ae561da4ec7c40830e97bf4dc8cf700fb">serial_read</a>(serPtr);</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        <span class="keywordflow">if</span> (res &lt; 0) <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160; </div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        out &lt;&lt;= 8;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        out |= res &amp; 0xFF;</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160; </div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;        i++;</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    }</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160; </div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;<span class="preprocessor">    #if defined(ARDUINO_ARCH_AVR)</span></div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;        <span class="keywordflow">if</span> (RXTX_pin &gt; 0) {</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;            digitalWrite(RXTX_pin, HIGH);</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;            pinMode(RXTX_pin, OUTPUT);</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        }</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;<span class="preprocessor">    #endif</span></div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160; </div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    <span class="keywordflow">while</span> (serPtr.available() &gt; 0) <a class="code" href="class_t_m_c2208_stepper.html#ae561da4ec7c40830e97bf4dc8cf700fb">serial_read</a>(serPtr); <span class="comment">// Flush</span></div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160; </div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    <span class="keywordflow">return</span> out;</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;}</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160; </div>
<div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a2fae2050849c3ab7968012def8ea1cc5">  221</a></span>&#160;uint32_t <a class="code" href="class_t_m_c2208_stepper.html#a2fae2050849c3ab7968012def8ea1cc5">TMC2208Stepper::read</a>(uint8_t addr) {</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    constexpr uint8_t len = 3;</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    addr |= <a class="code" href="class_t_m_c_stepper.html#a43eacaf00e14aceb35fa3f0da2e4f5c6">TMC_READ</a>;</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;    uint8_t datagram[] = {<a class="code" href="class_t_m_c2208_stepper.html#a00055ef39eb155038ef2c9938e7367ad">TMC2208_SYNC</a>, <a class="code" href="class_t_m_c2208_stepper.html#ab6ef909bbc73e9f8f0a33076e10f3196">slave_address</a>, addr, 0x00};</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    datagram[len] = <a class="code" href="class_t_m_c2208_stepper.html#a409c19fa6b052a370a317d061bf9af4e">calcCRC</a>(datagram, len);</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;    uint64_t out = 0x00000000UL;</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160; </div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;    <span class="keywordflow">for</span> (uint8_t i = 0; i &lt; <a class="code" href="class_t_m_c2208_stepper.html#ac5106eed26501e16c815c5526c54d7c4">max_retries</a>; i++) {</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;<span class="preprocessor">        #if SW_CAPABLE_PLATFORM</span></div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;            <span class="keywordflow">if</span> (SWSerial != <span class="keyword">nullptr</span>) {</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                    SWSerial-&gt;listen();</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;                    out = <a class="code" href="class_t_m_c2208_stepper.html#a3e1f6a10aa1e3e41dc2594dbe1ea8a1d">_sendDatagram</a>(*SWSerial, datagram, len, <a class="code" href="class_t_m_c2208_stepper.html#a27d18156b6d33d2d4d7285d6b47dd1c0">abort_window</a>);</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;                    SWSerial-&gt;stopListening();</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;            } <span class="keywordflow">else</span></div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;<span class="preprocessor">        #endif</span></div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;            {</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="class_t_m_c2208_stepper.html#a1f0e6d59f0378c19b486e7f6dda81747">sswitch</a> != <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;                    <a class="code" href="class_t_m_c2208_stepper.html#a1f0e6d59f0378c19b486e7f6dda81747">sswitch</a>-&gt;<a class="code" href="class_s_switch.html#a6ff09d0850d551571dc333fb74ff8628">active</a>();</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160; </div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;                out = <a class="code" href="class_t_m_c2208_stepper.html#a3e1f6a10aa1e3e41dc2594dbe1ea8a1d">_sendDatagram</a>(*<a class="code" href="class_t_m_c2208_stepper.html#aefd41ece3496f7e54e11d552a894ce66">HWSerial</a>, datagram, len, <a class="code" href="class_t_m_c2208_stepper.html#a27d18156b6d33d2d4d7285d6b47dd1c0">abort_window</a>);</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;            }</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160; </div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;        delay(<a class="code" href="class_t_m_c2208_stepper.html#a1c9a0e09dcee4483f712e89815abdf32">replyDelay</a>);</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160; </div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;        <a class="code" href="class_t_m_c2208_stepper.html#a19238ae7c7670e558e26b5fec11697ba">CRCerror</a> = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        uint8_t out_datagram[] = {</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;            <span class="keyword">static_cast&lt;</span>uint8_t<span class="keyword">&gt;</span>(out&gt;&gt;56),</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;            <span class="keyword">static_cast&lt;</span>uint8_t<span class="keyword">&gt;</span>(out&gt;&gt;48),</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;            <span class="keyword">static_cast&lt;</span>uint8_t<span class="keyword">&gt;</span>(out&gt;&gt;40),</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;            <span class="keyword">static_cast&lt;</span>uint8_t<span class="keyword">&gt;</span>(out&gt;&gt;32),</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;            <span class="keyword">static_cast&lt;</span>uint8_t<span class="keyword">&gt;</span>(out&gt;&gt;24),</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;            <span class="keyword">static_cast&lt;</span>uint8_t<span class="keyword">&gt;</span>(out&gt;&gt;16),</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;            <span class="keyword">static_cast&lt;</span>uint8_t<span class="keyword">&gt;</span>(out&gt;&gt; 8),</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;            <span class="keyword">static_cast&lt;</span>uint8_t<span class="keyword">&gt;</span>(out&gt;&gt; 0)</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;        };</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        uint8_t crc = <a class="code" href="class_t_m_c2208_stepper.html#a409c19fa6b052a370a317d061bf9af4e">calcCRC</a>(out_datagram, 7);</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;        <span class="keywordflow">if</span> ((crc != <span class="keyword">static_cast&lt;</span>uint8_t<span class="keyword">&gt;</span>(out)) || crc == 0 ) {</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;            <a class="code" href="class_t_m_c2208_stepper.html#a19238ae7c7670e558e26b5fec11697ba">CRCerror</a> = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;            out = 0;</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        }</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    }</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160; </div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;    <span class="keywordflow">return</span> out&gt;&gt;8;</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;}</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160; </div>
<div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a54eeb50855c3d7dd9e7078a5dc0ebdfc">  268</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2208_stepper.html#a54eeb50855c3d7dd9e7078a5dc0ebdfc">TMC2208Stepper::IFCNT</a>() {</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_t_m_c2208_stepper.html#a2fae2050849c3ab7968012def8ea1cc5">read</a>(<a class="code" href="struct_t_m_c2208_stepper_1_1_i_f_c_n_t__t.html#a3371450401a5dc628bcf515a1597111f">IFCNT_t::address</a>);</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;}</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160; </div>
<div class="line"><a name="l00272"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a62c4c6100151acdbae6de579009b9f0d">  272</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2208_stepper.html#a7a0682fc7f4d103bf3ceee4cabb411bb">TMC2208Stepper::SLAVECONF</a>(uint16_t input) {</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    SLAVECONF_register.sr = input&amp;0xF00;</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    <a class="code" href="class_t_m_c2208_stepper.html#a142b14de8a4dcc6cf76b4a6ede9e1cea">write</a>(SLAVECONF_register.address, SLAVECONF_register.sr);</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;}</div>
<div class="line"><a name="l00276"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a7a0682fc7f4d103bf3ceee4cabb411bb">  276</a></span>&#160;uint16_t <a class="code" href="class_t_m_c2208_stepper.html#a7a0682fc7f4d103bf3ceee4cabb411bb">TMC2208Stepper::SLAVECONF</a>() {</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    <span class="keywordflow">return</span> SLAVECONF_register.sr;</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;}</div>
<div class="line"><a name="l00279"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a8d1b1743b63ef0ab21a82da2acd5c465">  279</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2208_stepper.html#aa2a3e103c7a77af70e5d7925b15fe170">TMC2208Stepper::senddelay</a>(uint8_t B)   { SLAVECONF_register.senddelay = B; <a class="code" href="class_t_m_c2208_stepper.html#a142b14de8a4dcc6cf76b4a6ede9e1cea">write</a>(SLAVECONF_register.address, SLAVECONF_register.sr); }</div>
<div class="line"><a name="l00280"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#aa2a3e103c7a77af70e5d7925b15fe170">  280</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2208_stepper.html#aa2a3e103c7a77af70e5d7925b15fe170">TMC2208Stepper::senddelay</a>()         { <span class="keywordflow">return</span> SLAVECONF_register.senddelay; }</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160; </div>
<div class="line"><a name="l00282"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a755b2adec0990d6bfcf2f5f1daf9d692">  282</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2208_stepper.html#a755b2adec0990d6bfcf2f5f1daf9d692">TMC2208Stepper::OTP_PROG</a>(uint16_t input) {</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    <a class="code" href="class_t_m_c2208_stepper.html#a142b14de8a4dcc6cf76b4a6ede9e1cea">write</a>(<a class="code" href="struct_t_m_c2208_stepper_1_1_o_t_p___p_r_o_g__t.html#a449a44b13d3dc4c1b5154920877fb5e1">OTP_PROG_t::address</a>, input);</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;}</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160; </div>
<div class="line"><a name="l00286"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a0727482b76d6cd679021f4d1677e5b3a">  286</a></span>&#160;uint32_t <a class="code" href="class_t_m_c2208_stepper.html#a0727482b76d6cd679021f4d1677e5b3a">TMC2208Stepper::OTP_READ</a>() {</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_t_m_c2208_stepper.html#a2fae2050849c3ab7968012def8ea1cc5">read</a>(<a class="code" href="struct_t_m_c2208_stepper_1_1_o_t_p___r_e_a_d__t.html#ad43db23b66c477701cab03b0f06b0310">OTP_READ_t::address</a>);</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;}</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160; </div>
<div class="line"><a name="l00290"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a5441dd87d0bcea4ffc309cb012166a57">  290</a></span>&#160;uint32_t <a class="code" href="class_t_m_c2208_stepper.html#a5441dd87d0bcea4ffc309cb012166a57">TMC2208Stepper::IOIN</a>() {</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_t_m_c2208_stepper.html#a2fae2050849c3ab7968012def8ea1cc5">read</a>(<a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html#ab920e03b47f0b0282221739401f99372">TMC2208_n::IOIN_t::address</a>);</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;}</div>
<div class="line"><a name="l00293"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#acc1f92ce007231215fc4266fb4b99a62">  293</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2208_stepper.html#acc1f92ce007231215fc4266fb4b99a62">TMC2208Stepper::enn</a>()          { <a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html">TMC2208_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html#a1d538558c5041d9633c0e4cc60c81356">sr</a> = <a class="code" href="class_t_m_c2208_stepper.html#a5441dd87d0bcea4ffc309cb012166a57">IOIN</a>(); <span class="keywordflow">return</span> r.enn;      }</div>
<div class="line"><a name="l00294"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#adbace6f10c292506035b9d162ed239b4">  294</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2208_stepper.html#adbace6f10c292506035b9d162ed239b4">TMC2208Stepper::ms1</a>()          { <a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html">TMC2208_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html#a1d538558c5041d9633c0e4cc60c81356">sr</a> = <a class="code" href="class_t_m_c2208_stepper.html#a5441dd87d0bcea4ffc309cb012166a57">IOIN</a>(); <span class="keywordflow">return</span> r.ms1;      }</div>
<div class="line"><a name="l00295"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a4ec5d2b2f5a31259c7aba1f3208d63b8">  295</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2208_stepper.html#a4ec5d2b2f5a31259c7aba1f3208d63b8">TMC2208Stepper::ms2</a>()          { <a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html">TMC2208_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html#a1d538558c5041d9633c0e4cc60c81356">sr</a> = <a class="code" href="class_t_m_c2208_stepper.html#a5441dd87d0bcea4ffc309cb012166a57">IOIN</a>(); <span class="keywordflow">return</span> r.ms2;      }</div>
<div class="line"><a name="l00296"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a3e89d66eba91684da6dce09b366aa716">  296</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2208_stepper.html#a3e89d66eba91684da6dce09b366aa716">TMC2208Stepper::diag</a>()         { <a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html">TMC2208_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html#a1d538558c5041d9633c0e4cc60c81356">sr</a> = <a class="code" href="class_t_m_c2208_stepper.html#a5441dd87d0bcea4ffc309cb012166a57">IOIN</a>(); <span class="keywordflow">return</span> r.diag;     }</div>
<div class="line"><a name="l00297"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#ab1a4fdff9c56ed07ba453f961864e769">  297</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2208_stepper.html#ab1a4fdff9c56ed07ba453f961864e769">TMC2208Stepper::pdn_uart</a>()     { <a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html">TMC2208_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html#a1d538558c5041d9633c0e4cc60c81356">sr</a> = <a class="code" href="class_t_m_c2208_stepper.html#a5441dd87d0bcea4ffc309cb012166a57">IOIN</a>(); <span class="keywordflow">return</span> r.pdn_uart; }</div>
<div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#ac5cbf509e5e74a27507ce976bd973a4d">  298</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2208_stepper.html#ac5cbf509e5e74a27507ce976bd973a4d">TMC2208Stepper::step</a>()         { <a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html">TMC2208_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html#a1d538558c5041d9633c0e4cc60c81356">sr</a> = <a class="code" href="class_t_m_c2208_stepper.html#a5441dd87d0bcea4ffc309cb012166a57">IOIN</a>(); <span class="keywordflow">return</span> r.step;     }</div>
<div class="line"><a name="l00299"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a462e14ef67b55c14c361c741767eee5e">  299</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2208_stepper.html#a462e14ef67b55c14c361c741767eee5e">TMC2208Stepper::sel_a</a>()        { <a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html">TMC2208_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html#a1d538558c5041d9633c0e4cc60c81356">sr</a> = <a class="code" href="class_t_m_c2208_stepper.html#a5441dd87d0bcea4ffc309cb012166a57">IOIN</a>(); <span class="keywordflow">return</span> r.sel_a;    }</div>
<div class="line"><a name="l00300"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#af4a3a3c37720a10e59331f74c8a84a4e">  300</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2208_stepper.html#af4a3a3c37720a10e59331f74c8a84a4e">TMC2208Stepper::dir</a>()          { <a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html">TMC2208_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html#a1d538558c5041d9633c0e4cc60c81356">sr</a> = <a class="code" href="class_t_m_c2208_stepper.html#a5441dd87d0bcea4ffc309cb012166a57">IOIN</a>(); <span class="keywordflow">return</span> r.dir;      }</div>
<div class="line"><a name="l00301"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#afd696df315a1b1296bd77f6438c4cbe8">  301</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2208_stepper.html#afd696df315a1b1296bd77f6438c4cbe8">TMC2208Stepper::version</a>()   { <a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html">TMC2208_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html#a1d538558c5041d9633c0e4cc60c81356">sr</a> = <a class="code" href="class_t_m_c2208_stepper.html#a5441dd87d0bcea4ffc309cb012166a57">IOIN</a>(); <span class="keywordflow">return</span> r.version;  }</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160; </div>
<div class="line"><a name="l00303"></a><span class="lineno"><a class="line" href="class_t_m_c2224_stepper.html#aa5fa836e15992bc49e0297ef2126f725">  303</a></span>&#160;uint32_t <a class="code" href="class_t_m_c2224_stepper.html#aa5fa836e15992bc49e0297ef2126f725">TMC2224Stepper::IOIN</a>() {</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_t_m_c2208_stepper.html#a2fae2050849c3ab7968012def8ea1cc5">read</a>(<a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html#a1bd45ce6fea3fee1658e9f9d8aa14848">TMC2224_n::IOIN_t::address</a>);</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;}</div>
<div class="line"><a name="l00306"></a><span class="lineno"><a class="line" href="class_t_m_c2224_stepper.html#a2f2a8ebb0cebaf5bef7da211904a5021">  306</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2224_stepper.html#a2f2a8ebb0cebaf5bef7da211904a5021">TMC2224Stepper::enn</a>()          { <a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html">TMC2224_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html#a593ce7848831a10bb9e7d69040f770d0">sr</a> = <a class="code" href="class_t_m_c2224_stepper.html#aa5fa836e15992bc49e0297ef2126f725">IOIN</a>(); <span class="keywordflow">return</span> r.enn;      }</div>
<div class="line"><a name="l00307"></a><span class="lineno"><a class="line" href="class_t_m_c2224_stepper.html#aabae8c85472de339ada22f0f61021546">  307</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2224_stepper.html#aabae8c85472de339ada22f0f61021546">TMC2224Stepper::ms1</a>()          { <a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html">TMC2224_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html#a593ce7848831a10bb9e7d69040f770d0">sr</a> = <a class="code" href="class_t_m_c2224_stepper.html#aa5fa836e15992bc49e0297ef2126f725">IOIN</a>(); <span class="keywordflow">return</span> r.ms1;      }</div>
<div class="line"><a name="l00308"></a><span class="lineno"><a class="line" href="class_t_m_c2224_stepper.html#afdfe66e472e9a9e5889fb7a4d1f8c117">  308</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2224_stepper.html#afdfe66e472e9a9e5889fb7a4d1f8c117">TMC2224Stepper::ms2</a>()          { <a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html">TMC2224_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html#a593ce7848831a10bb9e7d69040f770d0">sr</a> = <a class="code" href="class_t_m_c2224_stepper.html#aa5fa836e15992bc49e0297ef2126f725">IOIN</a>(); <span class="keywordflow">return</span> r.ms2;      }</div>
<div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="class_t_m_c2224_stepper.html#a82d470cbe0cb44558eb18c724b1ae1a2">  309</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2224_stepper.html#a82d470cbe0cb44558eb18c724b1ae1a2">TMC2224Stepper::pdn_uart</a>()     { <a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html">TMC2224_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html#a593ce7848831a10bb9e7d69040f770d0">sr</a> = <a class="code" href="class_t_m_c2224_stepper.html#aa5fa836e15992bc49e0297ef2126f725">IOIN</a>(); <span class="keywordflow">return</span> r.pdn_uart; }</div>
<div class="line"><a name="l00310"></a><span class="lineno"><a class="line" href="class_t_m_c2224_stepper.html#a89b3a941b66bc63fd829bff1e9b93b57">  310</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2224_stepper.html#a89b3a941b66bc63fd829bff1e9b93b57">TMC2224Stepper::spread</a>()       { <a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html">TMC2224_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html#a593ce7848831a10bb9e7d69040f770d0">sr</a> = <a class="code" href="class_t_m_c2224_stepper.html#aa5fa836e15992bc49e0297ef2126f725">IOIN</a>(); <span class="keywordflow">return</span> r.spread;   }</div>
<div class="line"><a name="l00311"></a><span class="lineno"><a class="line" href="class_t_m_c2224_stepper.html#a6c39bd801b74acc912ccad9d56b5ffe0">  311</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2224_stepper.html#a6c39bd801b74acc912ccad9d56b5ffe0">TMC2224Stepper::step</a>()         { <a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html">TMC2224_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html#a593ce7848831a10bb9e7d69040f770d0">sr</a> = <a class="code" href="class_t_m_c2224_stepper.html#aa5fa836e15992bc49e0297ef2126f725">IOIN</a>(); <span class="keywordflow">return</span> r.step;     }</div>
<div class="line"><a name="l00312"></a><span class="lineno"><a class="line" href="class_t_m_c2224_stepper.html#accf4ed8a7f08c7efb9f16562f6fa756f">  312</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2224_stepper.html#accf4ed8a7f08c7efb9f16562f6fa756f">TMC2224Stepper::sel_a</a>()        { <a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html">TMC2224_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html#a593ce7848831a10bb9e7d69040f770d0">sr</a> = <a class="code" href="class_t_m_c2224_stepper.html#aa5fa836e15992bc49e0297ef2126f725">IOIN</a>(); <span class="keywordflow">return</span> r.sel_a;    }</div>
<div class="line"><a name="l00313"></a><span class="lineno"><a class="line" href="class_t_m_c2224_stepper.html#a4fc16e1cce786917e8fe885f5022d471">  313</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_t_m_c2224_stepper.html#a4fc16e1cce786917e8fe885f5022d471">TMC2224Stepper::dir</a>()          { <a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html">TMC2224_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html#a593ce7848831a10bb9e7d69040f770d0">sr</a> = <a class="code" href="class_t_m_c2224_stepper.html#aa5fa836e15992bc49e0297ef2126f725">IOIN</a>(); <span class="keywordflow">return</span> r.dir;      }</div>
<div class="line"><a name="l00314"></a><span class="lineno"><a class="line" href="class_t_m_c2224_stepper.html#ae35bc910232757fc0070509119355d9b">  314</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2224_stepper.html#ae35bc910232757fc0070509119355d9b">TMC2224Stepper::version</a>()   { <a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html">TMC2224_n::IOIN_t</a> r{0}; r.<a class="code" href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html#a593ce7848831a10bb9e7d69040f770d0">sr</a> = <a class="code" href="class_t_m_c2224_stepper.html#aa5fa836e15992bc49e0297ef2126f725">IOIN</a>(); <span class="keywordflow">return</span> r.version;  }</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160; </div>
<div class="line"><a name="l00316"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a64c51922eb2029e4bbcd4f8a51b6a6ae">  316</a></span>&#160;uint16_t <a class="code" href="class_t_m_c2208_stepper.html#a64c51922eb2029e4bbcd4f8a51b6a6ae">TMC2208Stepper::FACTORY_CONF</a>() {</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_t_m_c2208_stepper.html#a2fae2050849c3ab7968012def8ea1cc5">read</a>(FACTORY_CONF_register.address);</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;}</div>
<div class="line"><a name="l00319"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a97f0d743b9f5cf956637deb2e06d0145">  319</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2208_stepper.html#a64c51922eb2029e4bbcd4f8a51b6a6ae">TMC2208Stepper::FACTORY_CONF</a>(uint16_t input) {</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    FACTORY_CONF_register.sr = input;</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;    <a class="code" href="class_t_m_c2208_stepper.html#a142b14de8a4dcc6cf76b4a6ede9e1cea">write</a>(FACTORY_CONF_register.address, FACTORY_CONF_register.sr);</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;}</div>
<div class="line"><a name="l00323"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#ad920d81bde73173f5974a62a85b719e6">  323</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2208_stepper.html#a2576f25049dff1a3102da1ea5b4eb7fc">TMC2208Stepper::fclktrim</a>(uint8_t B){ FACTORY_CONF_register.fclktrim = B; <a class="code" href="class_t_m_c2208_stepper.html#a142b14de8a4dcc6cf76b4a6ede9e1cea">write</a>(FACTORY_CONF_register.address, FACTORY_CONF_register.sr); }</div>
<div class="line"><a name="l00324"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#ae51fb40f4fba4aecb8f0763adddb8296">  324</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2208_stepper.html#a1d354657666fa70cd13004cb70bc9fcf">TMC2208Stepper::ottrim</a>(uint8_t B)  { FACTORY_CONF_register.ottrim = B; <a class="code" href="class_t_m_c2208_stepper.html#a142b14de8a4dcc6cf76b4a6ede9e1cea">write</a>(FACTORY_CONF_register.address, FACTORY_CONF_register.sr); }</div>
<div class="line"><a name="l00325"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a2576f25049dff1a3102da1ea5b4eb7fc">  325</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2208_stepper.html#a2576f25049dff1a3102da1ea5b4eb7fc">TMC2208Stepper::fclktrim</a>()      { <a class="code" href="struct_f_a_c_t_o_r_y___c_o_n_f__t.html">FACTORY_CONF_t</a> r{0}; r.<a class="code" href="struct_f_a_c_t_o_r_y___c_o_n_f__t.html#a8c0ab60d7c4c211ec0e37c13d9e0dd99">sr</a> = <a class="code" href="class_t_m_c2208_stepper.html#a64c51922eb2029e4bbcd4f8a51b6a6ae">FACTORY_CONF</a>(); <span class="keywordflow">return</span> r.fclktrim; }</div>
<div class="line"><a name="l00326"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a1d354657666fa70cd13004cb70bc9fcf">  326</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2208_stepper.html#a1d354657666fa70cd13004cb70bc9fcf">TMC2208Stepper::ottrim</a>()        { <a class="code" href="struct_f_a_c_t_o_r_y___c_o_n_f__t.html">FACTORY_CONF_t</a> r{0}; r.<a class="code" href="struct_f_a_c_t_o_r_y___c_o_n_f__t.html#a8c0ab60d7c4c211ec0e37c13d9e0dd99">sr</a> = <a class="code" href="class_t_m_c2208_stepper.html#a64c51922eb2029e4bbcd4f8a51b6a6ae">FACTORY_CONF</a>(); <span class="keywordflow">return</span> r.ottrim; }</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160; </div>
<div class="line"><a name="l00328"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a9e9792fafdbbf0681daf613b2a5f507a">  328</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_t_m_c2208_stepper.html#a28b7ebef9a1f4b04d4b3b1e5e83ff76f">TMC2208Stepper::VACTUAL</a>(uint32_t input) {</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;    VACTUAL_register.sr = input;</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;    <a class="code" href="class_t_m_c2208_stepper.html#a142b14de8a4dcc6cf76b4a6ede9e1cea">write</a>(VACTUAL_register.address, VACTUAL_register.sr);</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;}</div>
<div class="line"><a name="l00332"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a28b7ebef9a1f4b04d4b3b1e5e83ff76f">  332</a></span>&#160;uint32_t <a class="code" href="class_t_m_c2208_stepper.html#a28b7ebef9a1f4b04d4b3b1e5e83ff76f">TMC2208Stepper::VACTUAL</a>() {</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;    <span class="keywordflow">return</span> VACTUAL_register.sr;</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;}</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160; </div>
<div class="line"><a name="l00336"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#adc81db53cf0291216352b13e5425e67b">  336</a></span>&#160;uint32_t <a class="code" href="class_t_m_c2208_stepper.html#adc81db53cf0291216352b13e5425e67b">TMC2208Stepper::PWM_SCALE</a>() {</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_t_m_c2208_stepper.html#a2fae2050849c3ab7968012def8ea1cc5">read</a>(<a class="code" href="struct_t_m_c2208__n_1_1_p_w_m___s_c_a_l_e__t.html#a964e13046de926dda8697f5df6f46679">TMC2208_n::PWM_SCALE_t::address</a>);</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;}</div>
<div class="line"><a name="l00339"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#ab98b6c9268243e35367a5247cc32dde4">  339</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2208_stepper.html#ab98b6c9268243e35367a5247cc32dde4">TMC2208Stepper::pwm_scale_sum</a>() {</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;    <a class="code" href="struct_t_m_c2208__n_1_1_p_w_m___s_c_a_l_e__t.html">TMC2208_n::PWM_SCALE_t</a> r{0};</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    r.<a class="code" href="struct_t_m_c2208__n_1_1_p_w_m___s_c_a_l_e__t.html#a80519708e8b01bd6071f1f3c814f32b5">sr</a> = <a class="code" href="class_t_m_c2208_stepper.html#adc81db53cf0291216352b13e5425e67b">PWM_SCALE</a>();</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;    <span class="keywordflow">return</span> r.pwm_scale_sum;</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;}</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160; </div>
<div class="line"><a name="l00345"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a2ad2f165b9961405c9ec905713d1f7ed">  345</a></span>&#160;int16_t <a class="code" href="class_t_m_c2208_stepper.html#a2ad2f165b9961405c9ec905713d1f7ed">TMC2208Stepper::pwm_scale_auto</a>() {</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;    <a class="code" href="struct_t_m_c2208__n_1_1_p_w_m___s_c_a_l_e__t.html">TMC2208_n::PWM_SCALE_t</a> r{0};</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;    r.<a class="code" href="struct_t_m_c2208__n_1_1_p_w_m___s_c_a_l_e__t.html#a80519708e8b01bd6071f1f3c814f32b5">sr</a> = <a class="code" href="class_t_m_c2208_stepper.html#adc81db53cf0291216352b13e5425e67b">PWM_SCALE</a>();</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;    <span class="keywordflow">return</span> r.pwm_scale_auto;</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;    <span class="comment">// Not two&#39;s complement? 9nth bit determines sign</span></div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;<span class="comment">    uint32_t d = PWM_SCALE();</span></div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;<span class="comment">    int16_t response = (d&gt;&gt;PWM_SCALE_AUTO_bp)&amp;0xFF;</span></div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;<span class="comment">    if (((d&amp;PWM_SCALE_AUTO_bm) &gt;&gt; 24) &amp; 0x1) return -response;</span></div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;<span class="comment">    else return response;</span></div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;<span class="comment">    */</span></div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;}</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160; </div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;<span class="comment">// R: PWM_AUTO</span></div>
<div class="line"><a name="l00359"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a3cad83843fc7cc00cbbff7d620690501">  359</a></span>&#160;uint32_t <a class="code" href="class_t_m_c2208_stepper.html#a3cad83843fc7cc00cbbff7d620690501">TMC2208Stepper::PWM_AUTO</a>() {</div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_t_m_c2208_stepper.html#a2fae2050849c3ab7968012def8ea1cc5">read</a>(<a class="code" href="struct_p_w_m___a_u_t_o__t.html#a6d2547adabb441fef0e780644aa4d3b1">PWM_AUTO_t::address</a>);</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;}</div>
<div class="line"><a name="l00362"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#af24b684f8072b9e5b064f093d266257e">  362</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2208_stepper.html#af24b684f8072b9e5b064f093d266257e">TMC2208Stepper::pwm_ofs_auto</a>()  { <a class="code" href="struct_p_w_m___a_u_t_o__t.html">PWM_AUTO_t</a> r{0}; r.<a class="code" href="struct_p_w_m___a_u_t_o__t.html#af4f71fd86c3c3f36d278220aa80bea8d">sr</a> = <a class="code" href="class_t_m_c2208_stepper.html#a3cad83843fc7cc00cbbff7d620690501">PWM_AUTO</a>(); <span class="keywordflow">return</span> r.pwm_ofs_auto; }</div>
<div class="line"><a name="l00363"></a><span class="lineno"><a class="line" href="class_t_m_c2208_stepper.html#a2940a4fc578d24624d835ac1664aeef3">  363</a></span>&#160;uint8_t <a class="code" href="class_t_m_c2208_stepper.html#a2940a4fc578d24624d835ac1664aeef3">TMC2208Stepper::pwm_grad_auto</a>() { <a class="code" href="struct_p_w_m___a_u_t_o__t.html">PWM_AUTO_t</a> r{0}; r.<a class="code" href="struct_p_w_m___a_u_t_o__t.html#af4f71fd86c3c3f36d278220aa80bea8d">sr</a> = <a class="code" href="class_t_m_c2208_stepper.html#a3cad83843fc7cc00cbbff7d620690501">PWM_AUTO</a>(); <span class="keywordflow">return</span> r.pwm_grad_auto; }</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a00055ef39eb155038ef2c9938e7367ad"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a00055ef39eb155038ef2c9938e7367ad">TMC2208Stepper::TMC2208_SYNC</a></div><div class="ttdeci">static constexpr uint8_t TMC2208_SYNC</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00999">TMCStepper.h:999</a></div></div>
<div class="ttc" id="astruct_t_m_c2224__n_1_1_i_o_i_n__t_html_a593ce7848831a10bb9e7d69040f770d0"><div class="ttname"><a href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html#a593ce7848831a10bb9e7d69040f770d0">TMC2224_n::IOIN_t::sr</a></div><div class="ttdeci">uint32_t sr</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208__bitfields_8h_source.html#l00052">TMC2208_bitfields.h:52</a></div></div>
<div class="ttc" id="astruct_t_m_c2208__n_1_1_p_w_m___s_c_a_l_e__t_html"><div class="ttname"><a href="struct_t_m_c2208__n_1_1_p_w_m___s_c_a_l_e__t.html">TMC2208_n::PWM_SCALE_t</a></div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208__bitfields_8h_source.html#l00168">TMC2208_bitfields.h:168</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a5441dd87d0bcea4ffc309cb012166a57"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a5441dd87d0bcea4ffc309cb012166a57">TMC2208Stepper::IOIN</a></div><div class="ttdeci">uint32_t IOIN()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00290">TMC2208Stepper.cpp:290</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a2940a4fc578d24624d835ac1664aeef3"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a2940a4fc578d24624d835ac1664aeef3">TMC2208Stepper::pwm_grad_auto</a></div><div class="ttdeci">uint8_t pwm_grad_auto()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00363">TMC2208Stepper.cpp:363</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a7c2e849de2f2933ba9bf8ede8dc53f53"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a7c2e849de2f2933ba9bf8ede8dc53f53">TMC2208Stepper::PWMCONF</a></div><div class="ttdeci">uint32_t PWMCONF()</div><div class="ttdef"><b>Definition:</b> <a href="_p_w_m_c_o_n_f_8cpp_source.html#l00054">PWMCONF.cpp:54</a></div></div>
<div class="ttc" id="astruct_t_m_c2208_stepper_1_1_o_t_p___p_r_o_g__t_html_a449a44b13d3dc4c1b5154920877fb5e1"><div class="ttname"><a href="struct_t_m_c2208_stepper_1_1_o_t_p___p_r_o_g__t.html#a449a44b13d3dc4c1b5154920877fb5e1">TMC2208Stepper::OTP_PROG_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00977">TMCStepper.h:977</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html"><div class="ttname"><a href="class_t_m_c_stepper.html">TMCStepper</a></div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00051">TMCStepper.h:51</a></div></div>
<div class="ttc" id="astruct_t_m_c2208__n_1_1_i_o_i_n__t_html_a1d538558c5041d9633c0e4cc60c81356"><div class="ttname"><a href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html#a1d538558c5041d9633c0e4cc60c81356">TMC2208_n::IOIN_t::sr</a></div><div class="ttdeci">uint32_t sr</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208__bitfields_8h_source.html#l00029">TMC2208_bitfields.h:29</a></div></div>
<div class="ttc" id="astruct_p_w_m___a_u_t_o__t_html_af4f71fd86c3c3f36d278220aa80bea8d"><div class="ttname"><a href="struct_p_w_m___a_u_t_o__t.html#af4f71fd86c3c3f36d278220aa80bea8d">PWM_AUTO_t::sr</a></div><div class="ttdeci">uint32_t sr</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c5160__bitfields_8h_source.html#l00052">TMC5160_bitfields.h:52</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a4ec5d2b2f5a31259c7aba1f3208d63b8"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a4ec5d2b2f5a31259c7aba1f3208d63b8">TMC2208Stepper::ms2</a></div><div class="ttdeci">bool ms2()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00295">TMC2208Stepper.cpp:295</a></div></div>
<div class="ttc" id="astruct_t_m_c2208__n_1_1_p_w_m___s_c_a_l_e__t_html_a964e13046de926dda8697f5df6f46679"><div class="ttname"><a href="struct_t_m_c2208__n_1_1_p_w_m___s_c_a_l_e__t.html#a964e13046de926dda8697f5df6f46679">TMC2208_n::PWM_SCALE_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208__bitfields_8h_source.html#l00169">TMC2208_bitfields.h:169</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_acc1f92ce007231215fc4266fb4b99a62"><div class="ttname"><a href="class_t_m_c2208_stepper.html#acc1f92ce007231215fc4266fb4b99a62">TMC2208Stepper::enn</a></div><div class="ttdeci">bool enn()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00293">TMC2208Stepper.cpp:293</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a1c9a0e09dcee4483f712e89815abdf32"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a1c9a0e09dcee4483f712e89815abdf32">TMC2208Stepper::replyDelay</a></div><div class="ttdeci">static constexpr uint8_t replyDelay</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l01001">TMCStepper.h:1001</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a462e14ef67b55c14c361c741767eee5e"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a462e14ef67b55c14c361c741767eee5e">TMC2208Stepper::sel_a</a></div><div class="ttdeci">bool sel_a()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00299">TMC2208Stepper.cpp:299</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a2fae2050849c3ab7968012def8ea1cc5"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a2fae2050849c3ab7968012def8ea1cc5">TMC2208Stepper::read</a></div><div class="ttdeci">uint32_t read(uint8_t)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00221">TMC2208Stepper.cpp:221</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a8eb0d71fbfeeb24c9092328c44fab7e5"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a8eb0d71fbfeeb24c9092328c44fab7e5">TMC2208Stepper::push</a></div><div class="ttdeci">void push()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00079">TMC2208Stepper.cpp:79</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a0727482b76d6cd679021f4d1677e5b3a"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a0727482b76d6cd679021f4d1677e5b3a">TMC2208Stepper::OTP_READ</a></div><div class="ttdeci">uint32_t OTP_READ()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00286">TMC2208Stepper.cpp:286</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_aefd41ece3496f7e54e11d552a894ce66"><div class="ttname"><a href="class_t_m_c2208_stepper.html#aefd41ece3496f7e54e11d552a894ce66">TMC2208Stepper::HWSerial</a></div><div class="ttdeci">Stream * HWSerial</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00985">TMCStepper.h:985</a></div></div>
<div class="ttc" id="aclass_t_m_c2224_stepper_html_a4fc16e1cce786917e8fe885f5022d471"><div class="ttname"><a href="class_t_m_c2224_stepper.html#a4fc16e1cce786917e8fe885f5022d471">TMC2224Stepper::dir</a></div><div class="ttdeci">bool dir()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00313">TMC2208Stepper.cpp:313</a></div></div>
<div class="ttc" id="aclass_s_switch_html"><div class="ttname"><a href="class_s_switch.html">SSwitch</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_e_r_i_a_l___s_w_i_t_c_h_8h_source.html#l00006">SERIAL_SWITCH.h:6</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a57a21913e94361f97293dc881a693b6d"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a57a21913e94361f97293dc881a693b6d">TMC2208Stepper::TMC2208Stepper</a></div><div class="ttdeci">TMC2208Stepper(Stream *SerialPort, float RS, uint8_t addr, uint16_t mul_pin1, uint16_t mul_pin2)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00015">TMC2208Stepper.cpp:15</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_aa2a3e103c7a77af70e5d7925b15fe170"><div class="ttname"><a href="class_t_m_c2208_stepper.html#aa2a3e103c7a77af70e5d7925b15fe170">TMC2208Stepper::senddelay</a></div><div class="ttdeci">uint8_t senddelay()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00280">TMC2208Stepper.cpp:280</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_ab98b6c9268243e35367a5247cc32dde4"><div class="ttname"><a href="class_t_m_c2208_stepper.html#ab98b6c9268243e35367a5247cc32dde4">TMC2208Stepper::pwm_scale_sum</a></div><div class="ttdeci">uint8_t pwm_scale_sum()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00339">TMC2208Stepper.cpp:339</a></div></div>
<div class="ttc" id="astruct_f_a_c_t_o_r_y___c_o_n_f__t_html_a8c0ab60d7c4c211ec0e37c13d9e0dd99"><div class="ttname"><a href="struct_f_a_c_t_o_r_y___c_o_n_f__t.html#a8c0ab60d7c4c211ec0e37c13d9e0dd99">FACTORY_CONF_t::sr</a></div><div class="ttdeci">uint16_t sr</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208__bitfields_8h_source.html#l00073">TMC2208_bitfields.h:73</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_ab1a4fdff9c56ed07ba453f961864e769"><div class="ttname"><a href="class_t_m_c2208_stepper.html#ab1a4fdff9c56ed07ba453f961864e769">TMC2208Stepper::pdn_uart</a></div><div class="ttdeci">bool pdn_uart()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00297">TMC2208Stepper.cpp:297</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a0e6a670edec623e394c4672c3eea9c0b"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a0e6a670edec623e394c4672c3eea9c0b">TMC2208Stepper::bytesWritten</a></div><div class="ttdeci">uint16_t bytesWritten</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00965">TMCStepper.h:965</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_afd696df315a1b1296bd77f6438c4cbe8"><div class="ttname"><a href="class_t_m_c2208_stepper.html#afd696df315a1b1296bd77f6438c4cbe8">TMC2208Stepper::version</a></div><div class="ttdeci">uint8_t version()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00301">TMC2208Stepper.cpp:301</a></div></div>
<div class="ttc" id="astruct_t_m_c2208__n_1_1_i_o_i_n__t_html"><div class="ttname"><a href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html">TMC2208_n::IOIN_t</a></div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208__bitfields_8h_source.html#l00026">TMC2208_bitfields.h:26</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a3cad83843fc7cc00cbbff7d620690501"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a3cad83843fc7cc00cbbff7d620690501">TMC2208Stepper::PWM_AUTO</a></div><div class="ttdeci">uint32_t PWM_AUTO()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00359">TMC2208Stepper.cpp:359</a></div></div>
<div class="ttc" id="aclass_t_m_c2224_stepper_html_a6c39bd801b74acc912ccad9d56b5ffe0"><div class="ttname"><a href="class_t_m_c2224_stepper.html#a6c39bd801b74acc912ccad9d56b5ffe0">TMC2224Stepper::step</a></div><div class="ttdeci">bool step()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00311">TMC2208Stepper.cpp:311</a></div></div>
<div class="ttc" id="a_t_m_c_stepper_8h_html"><div class="ttname"><a href="_t_m_c_stepper_8h.html">TMCStepper.h</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a6621972ab7af79ca78579f692048a205"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a6621972ab7af79ca78579f692048a205">TMC2208Stepper::beginSerial</a></div><div class="ttdeci">void beginSerial(uint32_t)=delete</div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a7a0682fc7f4d103bf3ceee4cabb411bb"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a7a0682fc7f4d103bf3ceee4cabb411bb">TMC2208Stepper::SLAVECONF</a></div><div class="ttdeci">uint16_t SLAVECONF()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00276">TMC2208Stepper.cpp:276</a></div></div>
<div class="ttc" id="aclass_t_m_c2224_stepper_html_a82d470cbe0cb44558eb18c724b1ae1a2"><div class="ttname"><a href="class_t_m_c2224_stepper.html#a82d470cbe0cb44558eb18c724b1ae1a2">TMC2224Stepper::pdn_uart</a></div><div class="ttdeci">bool pdn_uart()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00309">TMC2208Stepper.cpp:309</a></div></div>
<div class="ttc" id="aclass_t_m_c2224_stepper_html_ae35bc910232757fc0070509119355d9b"><div class="ttname"><a href="class_t_m_c2224_stepper.html#ae35bc910232757fc0070509119355d9b">TMC2224Stepper::version</a></div><div class="ttdeci">uint8_t version()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00314">TMC2208Stepper.cpp:314</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a43eacaf00e14aceb35fa3f0da2e4f5c6"><div class="ttname"><a href="class_t_m_c_stepper.html#a43eacaf00e14aceb35fa3f0da2e4f5c6">TMCStepper::TMC_READ</a></div><div class="ttdeci">static constexpr uint8_t TMC_READ</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00113">TMCStepper.h:113</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a1d354657666fa70cd13004cb70bc9fcf"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a1d354657666fa70cd13004cb70bc9fcf">TMC2208Stepper::ottrim</a></div><div class="ttdeci">uint8_t ottrim()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00326">TMC2208Stepper.cpp:326</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a54eeb50855c3d7dd9e7078a5dc0ebdfc"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a54eeb50855c3d7dd9e7078a5dc0ebdfc">TMC2208Stepper::IFCNT</a></div><div class="ttdeci">uint8_t IFCNT()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00268">TMC2208Stepper.cpp:268</a></div></div>
<div class="ttc" id="astruct_p_w_m___a_u_t_o__t_html"><div class="ttname"><a href="struct_p_w_m___a_u_t_o__t.html">PWM_AUTO_t</a></div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c5160__bitfields_8h_source.html#l00049">TMC5160_bitfields.h:49</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_af4a3a3c37720a10e59331f74c8a84a4e"><div class="ttname"><a href="class_t_m_c2208_stepper.html#af4a3a3c37720a10e59331f74c8a84a4e">TMC2208Stepper::dir</a></div><div class="ttdeci">bool dir()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00300">TMC2208Stepper.cpp:300</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a1f0e6d59f0378c19b486e7f6dda81747"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a1f0e6d59f0378c19b486e7f6dda81747">TMC2208Stepper::sswitch</a></div><div class="ttdeci">SSwitch * sswitch</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00991">TMCStepper.h:991</a></div></div>
<div class="ttc" id="aclass_t_m_c2224_stepper_html_accf4ed8a7f08c7efb9f16562f6fa756f"><div class="ttname"><a href="class_t_m_c2224_stepper.html#accf4ed8a7f08c7efb9f16562f6fa756f">TMC2224Stepper::sel_a</a></div><div class="ttdeci">bool sel_a()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00312">TMC2208Stepper.cpp:312</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a9ad9b892e8abf475e15e6d8c30c56ce2"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a9ad9b892e8abf475e15e6d8c30c56ce2">TMC2208Stepper::isEnabled</a></div><div class="ttdeci">bool isEnabled()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00090">TMC2208Stepper.cpp:90</a></div></div>
<div class="ttc" id="astruct_t_m_c2208__n_1_1_p_w_m___s_c_a_l_e__t_html_a80519708e8b01bd6071f1f3c814f32b5"><div class="ttname"><a href="struct_t_m_c2208__n_1_1_p_w_m___s_c_a_l_e__t.html#a80519708e8b01bd6071f1f3c814f32b5">TMC2208_n::PWM_SCALE_t::sr</a></div><div class="ttdeci">uint32_t sr</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208__bitfields_8h_source.html#l00171">TMC2208_bitfields.h:171</a></div></div>
<div class="ttc" id="a_t_m_c___m_a_c_r_o_s_8h_html"><div class="ttname"><a href="_t_m_c___m_a_c_r_o_s_8h.html">TMC_MACROS.h</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_af24b684f8072b9e5b064f093d266257e"><div class="ttname"><a href="class_t_m_c2208_stepper.html#af24b684f8072b9e5b064f093d266257e">TMC2208Stepper::pwm_ofs_auto</a></div><div class="ttdeci">uint8_t pwm_ofs_auto()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00362">TMC2208Stepper.cpp:362</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_ac5106eed26501e16c815c5526c54d7c4"><div class="ttname"><a href="class_t_m_c2208_stepper.html#ac5106eed26501e16c815c5526c54d7c4">TMC2208Stepper::max_retries</a></div><div class="ttdeci">static constexpr uint8_t max_retries</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l01003">TMCStepper.h:1003</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a2ad2f165b9961405c9ec905713d1f7ed"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a2ad2f165b9961405c9ec905713d1f7ed">TMC2208Stepper::pwm_scale_auto</a></div><div class="ttdeci">int16_t pwm_scale_auto()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00345">TMC2208Stepper.cpp:345</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_adc81db53cf0291216352b13e5425e67b"><div class="ttname"><a href="class_t_m_c2208_stepper.html#adc81db53cf0291216352b13e5425e67b">TMC2208Stepper::PWM_SCALE</a></div><div class="ttdeci">uint32_t PWM_SCALE()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00336">TMC2208Stepper.cpp:336</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ada185e5fe9970deb7d488cee26314878"><div class="ttname"><a href="class_t_m_c_stepper.html#ada185e5fe9970deb7d488cee26314878">TMCStepper::TMC_WRITE</a></div><div class="ttdeci">static constexpr uint8_t TMC_WRITE</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00114">TMCStepper.h:114</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a9de4a150926f2875903be27063f00973"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a9de4a150926f2875903be27063f00973">TMC2208Stepper::pdn_disable</a></div><div class="ttdeci">bool pdn_disable()</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_o_n_f_8cpp_source.html#l00091">GCONF.cpp:91</a></div></div>
<div class="ttc" id="astruct_t_m_c2224__n_1_1_i_o_i_n__t_html"><div class="ttname"><a href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html">TMC2224_n::IOIN_t</a></div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208__bitfields_8h_source.html#l00049">TMC2208_bitfields.h:49</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_aad3790e8c9040b5b4770ee65ed06b1ed"><div class="ttname"><a href="class_t_m_c2208_stepper.html#aad3790e8c9040b5b4770ee65ed06b1ed">TMC2208Stepper::toff</a></div><div class="ttdeci">uint8_t toff()</div><div class="ttdef"><b>Definition:</b> <a href="_c_h_o_p_c_o_n_f_8cpp_source.html#l00072">CHOPCONF.cpp:72</a></div></div>
<div class="ttc" id="astruct_p_w_m___a_u_t_o__t_html_a6d2547adabb441fef0e780644aa4d3b1"><div class="ttname"><a href="struct_p_w_m___a_u_t_o__t.html#a6d2547adabb441fef0e780644aa4d3b1">PWM_AUTO_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c5160__bitfields_8h_source.html#l00050">TMC5160_bitfields.h:50</a></div></div>
<div class="ttc" id="aclass_t_m_c2224_stepper_html_a89b3a941b66bc63fd829bff1e9b93b57"><div class="ttname"><a href="class_t_m_c2224_stepper.html#a89b3a941b66bc63fd829bff1e9b93b57">TMC2224Stepper::spread</a></div><div class="ttdeci">bool spread()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00310">TMC2208Stepper.cpp:310</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a409c19fa6b052a370a317d061bf9af4e"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a409c19fa6b052a370a317d061bf9af4e">TMC2208Stepper::calcCRC</a></div><div class="ttdeci">uint8_t calcCRC(uint8_t datagram[], uint8_t len)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00092">TMC2208Stepper.cpp:92</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a549db4f962d4ae698dda33ef9a708e33"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a549db4f962d4ae698dda33ef9a708e33">TMC2208Stepper::GCONF</a></div><div class="ttdeci">uint32_t GCONF()</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_o_n_f_8cpp_source.html#l00067">GCONF.cpp:67</a></div></div>
<div class="ttc" id="aclass_t_m_c2224_stepper_html_afdfe66e472e9a9e5889fb7a4d1f8c117"><div class="ttname"><a href="class_t_m_c2224_stepper.html#afdfe66e472e9a9e5889fb7a4d1f8c117">TMC2224Stepper::ms2</a></div><div class="ttdeci">bool ms2()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00308">TMC2208Stepper.cpp:308</a></div></div>
<div class="ttc" id="aclass_s_switch_html_a6ff09d0850d551571dc333fb74ff8628"><div class="ttname"><a href="class_s_switch.html#a6ff09d0850d551571dc333fb74ff8628">SSwitch::active</a></div><div class="ttdeci">void active()</div><div class="ttdef"><b>Definition:</b> <a href="_s_e_r_i_a_l___s_w_i_t_c_h_8cpp_source.html#l00012">SERIAL_SWITCH.cpp:12</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_aa11281f54c293f3ff2539b1a583682a9"><div class="ttname"><a href="class_t_m_c2208_stepper.html#aa11281f54c293f3ff2539b1a583682a9">TMC2208Stepper::CHOPCONF</a></div><div class="ttdeci">uint32_t CHOPCONF()</div><div class="ttdef"><b>Definition:</b> <a href="_c_h_o_p_c_o_n_f_8cpp_source.html#l00058">CHOPCONF.cpp:58</a></div></div>
<div class="ttc" id="a_s_e_r_i_a_l___s_w_i_t_c_h_8h_html"><div class="ttname"><a href="_s_e_r_i_a_l___s_w_i_t_c_h_8h.html">SERIAL_SWITCH.h</a></div></div>
<div class="ttc" id="astruct_t_m_c2224__n_1_1_i_o_i_n__t_html_a1bd45ce6fea3fee1658e9f9d8aa14848"><div class="ttname"><a href="struct_t_m_c2224__n_1_1_i_o_i_n__t.html#a1bd45ce6fea3fee1658e9f9d8aa14848">TMC2224_n::IOIN_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208__bitfields_8h_source.html#l00050">TMC2208_bitfields.h:50</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a64c51922eb2029e4bbcd4f8a51b6a6ae"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a64c51922eb2029e4bbcd4f8a51b6a6ae">TMC2208Stepper::FACTORY_CONF</a></div><div class="ttdeci">uint16_t FACTORY_CONF()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00316">TMC2208Stepper.cpp:316</a></div></div>
<div class="ttc" id="astruct_f_a_c_t_o_r_y___c_o_n_f__t_html"><div class="ttname"><a href="struct_f_a_c_t_o_r_y___c_o_n_f__t.html">FACTORY_CONF_t</a></div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208__bitfields_8h_source.html#l00070">TMC2208_bitfields.h:70</a></div></div>
<div class="ttc" id="aclass_t_m_c2224_stepper_html_aa5fa836e15992bc49e0297ef2126f725"><div class="ttname"><a href="class_t_m_c2224_stepper.html#aa5fa836e15992bc49e0297ef2126f725">TMC2224Stepper::IOIN</a></div><div class="ttdeci">uint32_t IOIN()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00303">TMC2208Stepper.cpp:303</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html"><div class="ttname"><a href="class_t_m_c2208_stepper.html">TMC2208Stepper</a></div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00806">TMCStepper.h:806</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a02994cba6b9ac73b61799cf7af0fd588"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a02994cba6b9ac73b61799cf7af0fd588">TMC2208Stepper::mstep_reg_select</a></div><div class="ttdeci">bool mstep_reg_select()</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_o_n_f_8cpp_source.html#l00092">GCONF.cpp:92</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a142b14de8a4dcc6cf76b4a6ede9e1cea"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a142b14de8a4dcc6cf76b4a6ede9e1cea">TMC2208Stepper::write</a></div><div class="ttdeci">void write(uint8_t, uint32_t)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00118">TMC2208Stepper.cpp:118</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a66812c883dfbb6dedc046a011b2564be"><div class="ttname"><a href="class_t_m_c_stepper.html#a66812c883dfbb6dedc046a011b2564be">TMCStepper::TPOWERDOWN</a></div><div class="ttdeci">uint8_t TPOWERDOWN()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00123">TMCStepper.cpp:123</a></div></div>
<div class="ttc" id="astruct_t_m_c2208__n_1_1_i_o_i_n__t_html_ab920e03b47f0b0282221739401f99372"><div class="ttname"><a href="struct_t_m_c2208__n_1_1_i_o_i_n__t.html#ab920e03b47f0b0282221739401f99372">TMC2208_n::IOIN_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208__bitfields_8h_source.html#l00027">TMC2208_bitfields.h:27</a></div></div>
<div class="ttc" id="astruct_t_m_c2208_stepper_1_1_o_t_p___r_e_a_d__t_html_ad43db23b66c477701cab03b0f06b0310"><div class="ttname"><a href="struct_t_m_c2208_stepper_1_1_o_t_p___r_e_a_d__t.html#ad43db23b66c477701cab03b0f06b0310">TMC2208Stepper::OTP_READ_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00978">TMCStepper.h:978</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a87e31a3e6c891b3b9a72812d3ceb9868"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a87e31a3e6c891b3b9a72812d3ceb9868">TMC2208Stepper::defaults</a></div><div class="ttdeci">void defaults()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00059">TMC2208Stepper.cpp:59</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_ab6ef909bbc73e9f8f0a33076e10f3196"><div class="ttname"><a href="class_t_m_c2208_stepper.html#ab6ef909bbc73e9f8f0a33076e10f3196">TMC2208Stepper::slave_address</a></div><div class="ttdeci">const uint8_t slave_address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00997">TMCStepper.h:997</a></div></div>
<div class="ttc" id="aclass_t_m_c2224_stepper_html_aabae8c85472de339ada22f0f61021546"><div class="ttname"><a href="class_t_m_c2224_stepper.html#aabae8c85472de339ada22f0f61021546">TMC2224Stepper::ms1</a></div><div class="ttdeci">bool ms1()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00307">TMC2208Stepper.cpp:307</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a3e1f6a10aa1e3e41dc2594dbe1ea8a1d"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a3e1f6a10aa1e3e41dc2594dbe1ea8a1d">TMC2208Stepper::_sendDatagram</a></div><div class="ttdeci">uint64_t _sendDatagram(SERIAL_TYPE &amp;, uint8_t[], const uint8_t, uint16_t)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00144">TMC2208Stepper.cpp:144</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a3e89d66eba91684da6dce09b366aa716"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a3e89d66eba91684da6dce09b366aa716">TMC2208Stepper::diag</a></div><div class="ttdeci">bool diag()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00296">TMC2208Stepper.cpp:296</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_ae561da4ec7c40830e97bf4dc8cf700fb"><div class="ttname"><a href="class_t_m_c2208_stepper.html#ae561da4ec7c40830e97bf4dc8cf700fb">TMC2208Stepper::serial_read</a></div><div class="ttdeci">int16_t serial_read(SERIAL_TYPE &amp;serPtr) __attribute__((weak))</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00110">TMC2208Stepper.cpp:110</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a974fa83e3bab04cd9f9a7b2d31ebd18e"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a974fa83e3bab04cd9f9a7b2d31ebd18e">TMC2208Stepper::begin</a></div><div class="ttdeci">void begin()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00050">TMC2208Stepper.cpp:50</a></div></div>
<div class="ttc" id="astruct_t_m_c2208_stepper_1_1_i_f_c_n_t__t_html_a3371450401a5dc628bcf515a1597111f"><div class="ttname"><a href="struct_t_m_c2208_stepper_1_1_i_f_c_n_t__t.html#a3371450401a5dc628bcf515a1597111f">TMC2208Stepper::IFCNT_t::address</a></div><div class="ttdeci">constexpr static uint8_t address</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00976">TMCStepper.h:976</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a28b7ebef9a1f4b04d4b3b1e5e83ff76f"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a28b7ebef9a1f4b04d4b3b1e5e83ff76f">TMC2208Stepper::VACTUAL</a></div><div class="ttdeci">uint32_t VACTUAL()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00332">TMC2208Stepper.cpp:332</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a2576f25049dff1a3102da1ea5b4eb7fc"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a2576f25049dff1a3102da1ea5b4eb7fc">TMC2208Stepper::fclktrim</a></div><div class="ttdeci">uint8_t fclktrim()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00325">TMC2208Stepper.cpp:325</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a7dd83313385079099b0622957786a979"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a7dd83313385079099b0622957786a979">TMC2208Stepper::serial_write</a></div><div class="ttdeci">uint8_t serial_write(SERIAL_TYPE &amp;serPtr, const uint8_t data) __attribute__((weak))</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00114">TMC2208Stepper.cpp:114</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a755b2adec0990d6bfcf2f5f1daf9d692"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a755b2adec0990d6bfcf2f5f1daf9d692">TMC2208Stepper::OTP_PROG</a></div><div class="ttdeci">void OTP_PROG(uint16_t input)</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00282">TMC2208Stepper.cpp:282</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_a597bc308bad0d1198b98c48a6ef34fc3"><div class="ttname"><a href="class_t_m_c_stepper.html#a597bc308bad0d1198b98c48a6ef34fc3">TMCStepper::IHOLD_IRUN</a></div><div class="ttdeci">uint32_t IHOLD_IRUN()</div><div class="ttdef"><b>Definition:</b> <a href="_i_h_o_l_d___i_r_u_n_8cpp_source.html#l00008">IHOLD_IRUN.cpp:8</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a27d18156b6d33d2d4d7285d6b47dd1c0"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a27d18156b6d33d2d4d7285d6b47dd1c0">TMC2208Stepper::abort_window</a></div><div class="ttdeci">static constexpr uint8_t abort_window</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l01002">TMCStepper.h:1002</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_adbace6f10c292506035b9d162ed239b4"><div class="ttname"><a href="class_t_m_c2208_stepper.html#adbace6f10c292506035b9d162ed239b4">TMC2208Stepper::ms1</a></div><div class="ttdeci">bool ms1()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00294">TMC2208Stepper.cpp:294</a></div></div>
<div class="ttc" id="aclass_t_m_c2224_stepper_html_a2f2a8ebb0cebaf5bef7da211904a5021"><div class="ttname"><a href="class_t_m_c2224_stepper.html#a2f2a8ebb0cebaf5bef7da211904a5021">TMC2224Stepper::enn</a></div><div class="ttdeci">bool enn()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00306">TMC2208Stepper.cpp:306</a></div></div>
<div class="ttc" id="aclass_t_m_c_stepper_html_ac59a9305aafc64a63698a34cac404788"><div class="ttname"><a href="class_t_m_c_stepper.html#ac59a9305aafc64a63698a34cac404788">TMCStepper::TPWMTHRS</a></div><div class="ttdeci">uint32_t TPWMTHRS()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8cpp_source.html#l00133">TMCStepper.cpp:133</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_a19238ae7c7670e558e26b5fec11697ba"><div class="ttname"><a href="class_t_m_c2208_stepper.html#a19238ae7c7670e558e26b5fec11697ba">TMC2208Stepper::CRCerror</a></div><div class="ttdeci">bool CRCerror</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c_stepper_8h_source.html#l00967">TMCStepper.h:967</a></div></div>
<div class="ttc" id="aclass_t_m_c2208_stepper_html_ac5cbf509e5e74a27507ce976bd973a4d"><div class="ttname"><a href="class_t_m_c2208_stepper.html#ac5cbf509e5e74a27507ce976bd973a4d">TMC2208Stepper::step</a></div><div class="ttdeci">bool step()</div><div class="ttdef"><b>Definition:</b> <a href="_t_m_c2208_stepper_8cpp_source.html#l00298">TMC2208Stepper.cpp:298</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_94e7a0fbe7f8eaf7f05ee7b02c647e9f.html">source</a></li><li class="navelem"><a class="el" href="_t_m_c2208_stepper_8cpp.html">TMC2208Stepper.cpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
